/*
 * Copyright (C) 2020-2021 The qidianxue.cn Authors.
 * https://www.qidianxue.cn
 */

package com.qdxwx.models.area;

import java.io.Serializable;

/**
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
public class Area implements Serializable {

    private static final long serialVersionUID = -5796202607726643593L;

    private int id;
    private String name;
    private String shortName;
    private String stdCode;
    private int level;
    private int childCount;
    private int parentId;
    private double sortOrder;

    public Area() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public String getStdCode() {
        return stdCode;
    }

    public void setStdCode(String stdCode) {
        this.stdCode = stdCode;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getChildCount() {
        return childCount;
    }

    public void setChildCount(int childCount) {
        this.childCount = childCount;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public double getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(double sortOrder) {
        this.sortOrder = sortOrder;
    }

    @Override
    public String toString() {
        return "Area{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", shortName='" + shortName + '\'' +
                ", stdCode='" + stdCode + '\'' +
                ", level=" + level +
                ", childCount=" + childCount +
                ", parentId=" + parentId +
                ", sortOrder=" + sortOrder +
                '}';
    }

    public static Area allChina() {
        Area area = new Area();
        area.setId(1);  //All-China predefined ID: 1
        area.setName("全国");
        area.setShortName("国");
        area.setParentId(0);
        return area;
    }
}
